package com.roobtyan.todomemback.service;

import com.roobtyan.todomemback.entity.MemCard;
import com.roobtyan.todomemback.entity.ViewCard;

import java.util.Date;
import java.util.List;

public interface CardService {

    List<MemCard> getCardListByDir1Id(int dir1Id);

    List<MemCard> selectCardListBySelective(MemCard memCard);

    List<ViewCard> getTodayCard();

    MemCard getCardById(String cardId);

    boolean insertSelectiveCard(MemCard memCard);

    boolean updateSelectiveCard(MemCard memCard);

    boolean deleteSelectiveCard(String cardId);

    /**
     * 计算出下一次复习的时间
     * @param reviewStep 复习步长
     * @return
     */
    Date computeReviewDate(int reviewStep);

    /**
     * 根据上一次的复习步长计算出下一次的复习步长
     * @param lastReviewStep 上一次复习的步长
     * @return
     */
    int computeReviewStep(int lastReviewStep);
}
